from maitch import *

hdvbd_includes = "-Ilibhdvbd -I${SRC_DIR}/libhdvbd"

def init(**kwargs):
    ctx = Context(**kwargs)

    if ctx.mode == 'configure':
        ctx.pkg_config('sqlite3', 'SQLITE')
        ctx.pkg_config('gobject-2.0 gthread-2.0', 'GOBJECT')
        ctx.pkg_config('gstreamer-app-1.0', 'GSTREAMER')
        ctx.pkg_config('gudev-1.0', 'GUDEV')
        h = ctx.find_sys_header("sqlite3.h", "${SQLITE_CFLAGS}")
        if not h:
            raise MaitchNotFoundError("sqlite3.h not found")
        ctx.setenv("SQLITE3_H", h)
        ctx.find_prog_env("gob2")
    #elif ctx.mode == 'build':

    return ctx
